﻿using System;
using System.Windows.Forms;
using Syncfusion.Windows.Forms;

namespace PMngr.Main
{
    public class MessageFactory
    {
        public static readonly string Caption = Utilities.CaptionTitle;

        // yes or no
        public static DialogResult MessageBoxShow(string message)
        {
            MessageBoxAdv.Office2007Theme = Office2007Theme.Silver;
            var result = MessageBoxAdv.Show(message, Caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            return result;
        }

        public static void Show(string message, MessageBoxIcon icon)
        {
            MessageBoxAdv.Office2007Theme = Office2007Theme.Silver;
            MessageBoxAdv.Show(message, Caption, MessageBoxButtons.OK, icon);
        }

        public static void Show(string message, MessageType messageType)
        {
            var icon = (MessageBoxIcon)Enum.Parse(typeof(MessageBoxIcon), messageType.ToString());
            Show(message, icon);
        }

        public static void Show(string message)
        {
            Show(message, MessageBoxIcon.Exclamation);           
        }
    }
}
